export const navs = [
  {
    id: 1,
    txt: '',
    img: require('@/assets/img/map_head.png')
  },
  {
    id: 2,
    txt: '',
    img: require('@/assets/img/map_search.png')
  },
  {
    id: 3,
    txt: '告警',
    img: require('@/assets/img/map_alarm.png'),
    url: '/alarm'
  },
  // {
  //   id: 4,
  //   txt: '能源',
  //   img: require('@/assets/img/map_energy.png'),
  //   url: ''
  // },
  {
    id: 5,
    txt: '',
    img: require('@/assets/img/map_man.png')
  },
]

export const homeNavs = [ 
  {
    id: 6,
    txt: '地图',
    img:require('@/assets/img/huiditu.png'),
    url: '/map'
  },
  {
    id: 3,
    txt: '告警',
    img: require('@/assets/img/map_alarm.png'),
    url: '/alarm'
  },
  // {
  //   id: 4,
  //   txt: '能源',
  //   img: require('@/assets/img/map_energy.png'),
  //   url: ''
  // },
  {
    id: 5,
    txt: '',
    img: require('@/assets/img/map_man.png')
  },
]

export const alarmNavs = [
  {
    id: 6,
    txt: '地图',
    img: require('@/assets/img/huiditu.png'),
    url: '/map'
  },
  {
    id: 3,
    txt: '主页',
    img: require('@/assets/img/map_home.png'),
    url: '/home'
  },
  
  // {
  //   id: 4,
  //   txt: '能源',
  //   img: require('@/assets/img/map_energy.png'),
  //   url: ''
  // },
  {
    id: 5,
    txt: '',
    img: require('@/assets/img/map_man.png')
  },
]

export const alarmsNavs = [
  {
    id: 3,
    txt: '地图',
    img: require('@/assets/img/huiditu.png'),
    url: '/map'
  },
  // {
  //   id: 4,
  //   txt: '能源',
  //   img: require('@/assets/img/map_energy.png'),
  //   url: ''
  // },
  {
    id: 5,
    txt: '',
    img: require('@/assets/img/map_man.png')
  },
]

export const deviceListstate = {
  'setTem':{
    txt:'设定温度',
    unit:'℃'
  },
  'rTem' : {
    txt:'室内温度',
    unit:'℃'
  },
  'airQ' : {
    txt:'风量'
  },
  'tem' : {
    txt: '温度',
    unit:'℃'
  },
  'hum' : {
    txt: '湿度',
    unit:'%RH'
  }
}

export const deviceStatusMap = {
  0: {
    txt: '未确认',
    className: 'bg-grey'
  },
  1: {
    txt: '已确认',
    className: 'bg-success'
  },
  2: {
    txt: '已复归',
    className: 'bg-success'
  },
  3: {
    txt: '故 障',
    className: 'bg-error'
  },
  5: {
    txt: '掉 线',
    className: 'bg-grey'
  },
  6: {
    txt: '屏 蔽',
    className: 'bg-error'
  },
  7: {
    txt: '封 锁',
    className: 'bg-warn'
  },
  8: {
    txt: '运行中',
    className: 'bg-success'
  },
  9: {
    txt: '空 闲',
    className: 'bg-success'
  },
  99: {
    txt: '正 常',
    className: 'bg-success'
  },
}


export const except_levels = [
  {
    key: 1,
    value: '一级告警',
    txt: '一级'
  },
  {
    key: 2,
    value: '二级告警',
    txt: '二级'
  },
  {
    key: 3,
    value: '三级告警',
    txt: '三级'
  },
]

export const dealStatusMap = [
  {
    key: 0,
    value: '未处理',
    className: 'error' 
  },
  {
    key: 5,
    value: '未处理',
    className: 'error' 
  },
  // {
  //   key: 1,
  //   value: '正在处理',
  //   className: 'warn'
  // },
  {
    key: 2,
    value: '已处理',
    className: ''
  },
] 
export const dealStatusMaps = [
  {
    key: 0,
    value: '未处理',
    className: 'error' 
  },
  {
    key: 2,
    value: '已处理',
    className: ''
  },
]
export const alarmRelieve = {
  '0':'自动取消',
  '1':'人为处理'
}
export const COFFEE_TYPE = {
  '2': '浓缩咖啡 双份',
  '102':'浓缩咖啡双份(后台)',
  '3': '浓缩咖啡 单份',
  '103':'浓缩咖啡单份(后台)',
  '4': '润湿',
  '16':	'湿润',
  '5': '热拿铁',
  '6': '冻拿铁',
  '7': '冻拿铁 少冰',
  '8': '冻拿铁 去冰',
  '9': '芝芝热拿铁',
  '10': '芝芝冻拿铁',
  '11':	'芝芝冻拿铁 少冰',
  '12':	'芝芝冻拿铁 去冰',
  '14':	'热美式',
  '15':	'芝芝热美式',
  '17':	'咖啡波波热',
  '18':	'少少糖 咖啡波波热',
  '19': '少少少糖 咖啡波波热',
  '20': '不另外加糖 咖啡波波热',
  '21':	'牛奶 hot 10s',
  '22':	'牛奶 hot 5s',
  '23':	'牛奶 cold 10s',
  '24':	'牛奶 cold 5s',
  '45': '热水'
}

export const COFFEE_TYPE_LIMIT = {
  '1': {
    l: null,
    u: null
  },
  '2': {
    l: 18,
    u: 28
  },
  '3': {
    l: 11,
    u: 21
  },
  '4': {
    l: null,
    u: null
  },
  '5': {
    l: 18,
    u: 28
  },
  '6': {
    l: 18,
    u: 28
  },
  '7': {
    l: 18,
    u: 28
  },
  '8': {
    l: 18,
    u: 28
  },
  '9': {
    l: 18,
    u: 28
  },
  '10': {
    l: 18,
    u: 28
  },
  '11': {
    l: 18,
    u: 28
  },
  '12': {
    l: 18,
    u: 28
  },
  '13': {
    l: null,
    u: null
  },
  '14': {
    l: 18,
    u: 28
  },
  '15': {
    l: 18,
    u: 28
  },
  '16': {
    l: null,
    u: null
  },
  '17': {
    l: 11,
    u: 21
  },
  '18': {
    l: 11,
    u: 21
  },
  '19': {
    l: 11,
    u: 21
  },
  '20': {
    l: 11,
    u: 21
  },
  '21': {
    l: null,
    u: null
  },
  '22': {
    l: null,
    u: null
  },
  '23': {
    l: null,
    u: null
  },
  '24': {
    l: null,
    u: null
  },
  '45': {
    l: null,
    u: null
  },
  '102':{
    l: 18,
    u: 28
  },
  '103':{
    l: 11,
    u: 21
  }
}

// selectMenu(val) {
  
//   this.$store.commit('app/SET_SELECTPATH', this.selectPath)
// }


export function keyToZh (k) {
  switch (k) {
    case 'tem':
      return '温度'
    case 'hum':
      return '湿度'  
    case 'setTem':
      return '设定温度'
    case 'rTem':
      return '房间温度'
    case 'mode':
      return '运行模式'
    case 'airQ':
      return '风量'
  }
}


export function valToZh (v) {
  if(v===0){
    return '自动'
  }else if (v === 1) {
    return `制冷`
  } else if (v === 2) {
    return '除湿'
  } else if (v === 3) {
    return `制热`
  } else if (v === 4) {
    return `送风`
  }  else {
    return '-'
  }
}

// 空调表盘map
// 锁定解锁
export const lockImgMap = {
  1: {
    img: require('@/assets/img/air_lock.png'),
    className: 'air-lock'
  },
  0: {
    img: require('@/assets/img/air_unlock.png'),
    className: 'air-unlock'
  }
}
// 空调模式
export const patternMap = {
  0 : {
    img: require('@/assets/img/air_zidong.png')
  },
  1 : {
    img: require('@/assets/img/air_snow.png')
  },
  2 : {
    img: require('@/assets/img/air_water.png')
  },
  3 : {
    img: require('@/assets/img/air_sun.png')
  },
  4 : {
    img: require('@/assets/img/air_wind.png')
  },
}

// 空调风量

export const airfengMap = {
  0 : {
    img: require('@/assets/img/air_autofeng.png')
  },
  1 : {
    img: require('@/assets/img/air_pingjing.png')
  },
}